import request from '@/utils/request'

// 查询入库列表
export function listIn(query) {
    return request({
        url: '/stock/in/list',
        method: 'get',
        params: query
    })
}

// 查询入库详细
export function getIn(id) {
    return request({
        url: '/stock/in/' + id,
        method: 'get'
    })
}

// 获取采购入库编号
export function getCGRK(){
    return request({
        url: '/stock/in/getCGRK',
        method: 'get'
    })
}

// 新增入库
export function addIn(data) {
    return request({
        url: '/stock/in',
        method: 'post',
        data: data
    })
}
// 采购入库
export function addPurchase(data) {
    return request({
        url: '/stock/in/purchase',
        method: 'post',
        data: data
    })
}


// 修改入库
export function updateIn(data) {
    return request({
        url: '/stock/in',
        method: 'put',
        data: data
    })
}

// 删除入库
export function delIn(id) {
    return request({
        url: '/stock/in/' + id,
        method: 'delete'
    })
}
